package com.util;

/** 
 * @ClassName: TimeCounter 
 * @Description: 计时器
 * @author minjun minjun@bw30.com
 * @date 2015-2-18 上午6:55:32 
 *  
 */
public class TimeCounter {
	
	private static long start=0;

	public static void start(){
		start=getMiliTime();
	}
	
	public static long count(){
		if(start==0) throw new RuntimeException("请先开始计时");
		return getMiliTime()-start;
	}

	/** 
	* @Title: getTime 
	* @Description: TODO(这里用一句话描述这个方法的作用) 
	* @param @return    设定文件 
	* @return long    返回类型 
	* @throws 
	*/ 
	private static long getMiliTime() {
		return System.currentTimeMillis();
	}
}
